package cn.weiron.fun.infrastructure.dictionary;

import cn.weiron.fun.infrastructure.utils.EnumsUtil;

/**
 * 领域模型：字典编码分组
 */
public enum DictionaryGroup {
    Region("REGION", "区域编码");

    public static DictionaryGroup valueOf(int code) {
        return EnumsUtil.valueOf(code, values(), DictionaryGroup::getValue, Region);
    }

    private final String value;
    private final String title;

    DictionaryGroup(String value, String title) {
        this.value = value;
        this.title = title;
    }

    public String getValue() {
        return value;
    }

    public String getTitle() {
        return title;
    }
}